<include file="Index:header" />
<!--头部 end -->
<!--左栏 starts -->
<div class="container-fluid">
		<div class="row-fluid">
			<include file="left" />

			<div id="content" class="span10">
			<!-- content starts -->
<!--左栏 end -->
<ul class="breadcrumb">
      <li>
        <a href="__APP__/TIFAWEB_DSWJCMS.html">首页</a> <span class="divider">/</span>
      </li>
      <li class="active">用户资金汇总</li>
</ul>
<form method="post" action="__APP__/TIFAWEB_DSWJCMS/Fund/financialExports">
<div class="fund_screening">
<input name="topup" id="topup" type="hidden" value="1" />
<input name="withdrawal" id="withdrawal" type="hidden" value="1" />
<input name="investment" id="investment" type="hidden" value="1" />
<input name="times" id="times" type="hidden" value="0" />
    <p><b>起止日期：</b>
    <input name="starttime" type="text" id="starttime" style="width:150px;" value=''/>
-
<input name="endtime" type="text" id="endtime" style="width:150px;" value=''/>
    
   <span class="times">
   <a id="act" class="active" href="javascript:void(0)" onclick="screening(2,0);$(this).addClass('active')">全部</a>
   <a href="javascript:void(0)" onclick="screening(2,1);$(this).addClass('active')">今日</a>
   <a href="javascript:void(0)" onclick="screening(2,2);$(this).addClass('active')">本周</a>
   <a href="javascript:void(0)" onclick="screening(2,3);$(this).addClass('active')">本月</a>
   <a href="javascript:void(0)" onclick="screening(2,4);$(this).addClass('active')">3个月</a>
   <a href="javascript:void(0)" onclick="screening(2,5);$(this).addClass('active')">今年</a>
   </span> </p>
    <dl class="type">
        <dt>参于统计换算条件筛选（多选）:</dt>
        <dd><a id='topups' href="javascript:void(0)" class="active" onclick="screening(1,1);">充值</a></dd>
        <dd><a id='withdrawals' href="javascript:void(0)" class="active" onclick="screening(1,2);">提现</a></dd>
        <dd><a id='investments' href="javascript:void(0)" class="active" onclick="screening(1,3);">交易</a></dd>

    </dl>
</div>
    <div id="ajax">
        <div class="row-fluid">
            <div class="span6"><b>平台总资产：</b>0.00元</div>
            <div class="span6"><b>平台盈利：</b>0.00元</div>
        </div>
        <div class="row-fluid">
            <div class="span6"><b>充值金额：</b>0.00元</div>
            <div class="span6"><b>提现金额：</b>0.00元</div>
        </div>
        <div class="row-fluid">
            <div class="span6"><b>投资金额：</b>0.00元</div>
            <div class="span6"><b>融资金额：</b>0.00元</div>
        </div>
        <div class="row-fluid">
            <div class="span6"><b>平台垫付：</b>0.00元</div>
            <div class="span6"><b>垫付回款：</b>0.00元</div>
        </div>
	</div>
<div>
</div>
<!--底部 -->
<script>
function changeVerify(){
    var timenow = new Date().getTime();
    document.getElementById('verifyImg').src='__APP__/Public/verify/'+timenow;
}
</script>
<div id="export" class="modal hide fade in" >
    <div class="modal-header">
      <a class="close" data-dismiss="modal" >&times;</a>
      <h3>导出</h3>
    </div>
    <div class="modal-body">
    <div class="alert alert-info">
        <p>每次导出条数最多5000条，如果数据总合以超5000条请输入上一份导出文件的最大ID值</p>
    </div>
    
       <table class="table">
        <tbody>
          <tr>
          <td>开始ID：</td>
          <td>
             	<input name="fid" type="text"  value=''/>
          </td>
          
          </tr>
          
        </tbody>
       	</table>
        <div class="pull-right">
          <button class="btn btn-primary" type="submit">
              确定
          </button>
      	</div>
    
    </div>
    </form>
</div>
<include file="Index:footer" />

<!-- 日期选择器 -->
<link type="text/css" rel="stylesheet" href="__PUBLIC__/css/jquery.datetimepicker.css">
  <script src="__PUBLIC__/js/jquery.datetimepicker.js"></script>
<script>
$('#starttime').datetimepicker({lang:'ch',timepicker:false,format:'Y-m-d',onChangeDateTime:function(dp,$input){
	var topup=$('#topup').val();
	var withdrawal=$('#withdrawal').val();
	var investment=$('#investment').val();
	var financing=$('#financing').val();
	var transfer=$('#transfer').val();
	var reward=$('#reward').val();
	var deduction=$('#deduction').val();
	var membership=$('#membership').val();
	var management=$('#management').val();
	var poundage=$('#poundage').val();
	var advances=$('#advances').val();
	$(".times a").removeClass("active");
	var loading='<div class="invest_loading"><div><img src="__PUBLIC__/bootstrap/img/ajax-loaders/ajax-loader-1.gif"/></div><div>加载中...</div> </div>';
	var starttime=$input.val();
	var endtime=$('#endtime').val();
	$("#ajax").html(loading);
	$('#ajax').load("__APP__/TIFAWEB_DSWJCMS/Fund/ajaxdetail", {topup:topup,withdrawal:withdrawal,investment:investment,financing:financing,transfer:transfer,reward:reward,deduction:deduction,membership:membership,management:management,poundage:poundage,advances:advances,starttime:starttime,endtime:endtime});
}});
$('#endtime').datetimepicker({lang:'ch',timepicker:false,format:'Y-m-d',onChangeDateTime:function(dp,$input){
	var topup=$('#topup').val();
	var withdrawal=$('#withdrawal').val();
	var investment=$('#investment').val();
	var financing=$('#financing').val();
	var transfer=$('#transfer').val();
	var reward=$('#reward').val();
	var deduction=$('#deduction').val();
	var membership=$('#membership').val();
	var management=$('#management').val();
	var poundage=$('#poundage').val();
	var advances=$('#advances').val();
	$(".times a").removeClass("active");
	var loading='<div class="invest_loading"><div><img src="__PUBLIC__/bootstrap/img/ajax-loaders/ajax-loader-1.gif"/></div><div>加载中...</div> </div>';
	var endtime=$input.val();
	var starttime=$('#starttime').val();
	$("#ajax").html(loading);
	$('#ajax').load("__APP__/TIFAWEB_DSWJCMS/Fund/ajaxdetail", {topup:topup,withdrawal:withdrawal,investment:investment,financing:financing,transfer:transfer,reward:reward,deduction:deduction,membership:membership,management:management,poundage:poundage,advances:advances,starttime:starttime,endtime:endtime});
}});
window.onload = screening(2,0);
window.onload = $('#act').addClass('active');
function screening(type,values){
	var endtime=$('#endtime').val();
	var starttime=$('#starttime').val();
	var topup=$('#topup').val();
	var withdrawal=$('#withdrawal').val();
	var investment=$('#investment').val();
	var financing=$('#financing').val();
	var transfer=$('#transfer').val();
	var reward=$('#reward').val();
	var deduction=$('#deduction').val();
	var membership=$('#membership').val();
	var management=$('#management').val();
	var poundage=$('#poundage').val();
	var advances=$('#advances').val();
	if(type==1){
		switch(values){
			case 1:
			if(topup==1){
				$('#topup').val('0');
				$('#topups').removeClass("active");
				topup=0;
			}else{
				$('#topup').val(1);
				$('#topups').addClass('active');
				topup=1;
			}
			break;
			case 2:
			if(withdrawal==1){
				$('#withdrawal').val('0');
				$('#withdrawals').removeClass("active");
				withdrawal=0;
			}else{
				$('#withdrawal').val(1);
				$('#withdrawals').addClass('active');
				withdrawal=1;
			}
			break;
			case 3:
			if(investment==1){
				$('#investment').val('0');
				$('#investments').removeClass("active");
				investment=0;
			}else{
				$('#investment').val(1);
				$('#investments').addClass('active');
				investment=1;
			}
			break;
			case 4:
			if(financing==1){
				$('#financing').val('0');
				$('#financings').removeClass("active");
				financing=0;
			}else{
				$('#financing').val(1);
				$('#financings').addClass('active');
				financing=1;
			}
			break;
			case 5:
			if(transfer==1){
				$('#transfer').val('0');
				$('#transfers').removeClass("active");
				transfer=0;
			}else{
				$('#transfer').val(1);
				$('#transfers').addClass('active');
				transfer=1;
			}
			break;
			case 6:
			if(reward==1){
				$('#reward').val('0');
				$('#rewards').removeClass("active");
				reward=0;
			}else{
				$('#reward').val(1);
				$('#rewards').addClass('active');
				reward=1;
			}
			break;
			case 7:
			if(deduction==1){
				$('#deduction').val('0');
				$('#deductions').removeClass("active");
				deduction=0;
			}else{
				$('#deduction').val(1);
				$('#deductions').addClass('active');
				deduction=1;
			}
			break;
			case 8:
			if(membership==1){
				$('#membership').val('0');
				$('#memberships').removeClass("active");
				membership=0;
			}else{
				$('#membership').val(1);
				$('#memberships').addClass('active');
				membership=1;
			}
			break;
			case 9:
			if(management==1){
				$('#management').val('0');
				$('#managements').removeClass("active");
				management=0;
			}else{
				$('#management').val(1);
				$('#managements').addClass('active');
				management=1;
			}
			break;
			case 10:
			if(poundage==1){
				$('#poundage').val('0');
				$('#poundages').removeClass("active");
			}else{
				$('#poundage').val(1);
				$('#poundages').addClass('active');
			}
			break;
			case 11:
			if(advances==1){
				$('#advances').val('0');
				$('#advancess').removeClass("active");
				advances=0;
			}else{
				$('#advances').val(1);
				$('#advancess').addClass('active');
				advances=1;
			}
			break;
			
		}
	}else if(type==2){
		$('#times').val(values);
		$(".times a").removeClass("active");
		var times=values;
	}
	var loading='<div class="invest_loading"><div><img src="__PUBLIC__/bootstrap/img/ajax-loaders/ajax-loader-1.gif"/></div><div>加载中...</div> </div>';
		$("#ajax").html(loading);
	$('#ajax').load("__APP__/TIFAWEB_DSWJCMS/Fund/ajaxdetail", {topup:topup,withdrawal:withdrawal,investment:investment,financing:financing,transfer:transfer,reward:reward,deduction:deduction,membership:membership,management:management,poundage:poundage,advances:advances,times:times,starttime:starttime,endtime:endtime});
}
</script>